<!--START JS-->
<i id="scriptTag">/static/js/console/brancheCreate.js</i>
<link rel="stylesheet" type="text/css" href="/static/css/plugins/chosen/chosen.css" >
<!--END JS-->

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?php echo $page_title; ?></h2>
        <p>您可在此进行<?php echo $page_title; ?></p>
    </div>
    <div class="col-lg-2"></div>
</div>

<!--START branches-->
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5><?php echo $page_title; ?></h5>
                </div>
                <div class="ibox-content">
                    <input type="hidden" value="<?php echo $is_success; ?>" id="is-success">
                    <form role="form" action="/console/brancheCreate" method="post">
                        <div class="form-group <?php if (form_error('shop_id')) echo 'has-error'; ?>">
                            <label>选择门店：</label> 
                            <select class="form-control" name="shop_id">
                                <option value="">---还未选择---</option>
                                <?php foreach ($detail as $item) { ?>
                                    <option value="<?php echo $item['id']; ?>"><?php echo $item['shop_name']; ?></option>
                                <?php } ?>
                            </select>
                        </div>
                        <div class="form-group <?php if (form_error('branche_name')) echo 'has-error'; ?>">
                            <label>分店名称：</label>
                            <input type="text" placeholder="请输入分店名称" class="form-control" value="" name="branche_name" required="">
                        </div>
                        <div class="form-group <?php if (form_error('branche_phone')) echo 'has-error'; ?>">
                            <label>电话：</label> 
                            <input type="text" placeholder="请输入门店联系电话" class="form-control" value="" name="branche_phone" minlength="8" maxlength="15" required>
                        </div>
                        <div class="form-group">
                            <label>省市：<?php if (form_error('branche_province') || form_error('shop_city')) echo '<span class="text-danger">省市均不能为空！</span>'; ?></label>
                            <div class="row">
                                <div class="col-lg-5">
                                    <select class="province-chosen-select" data-placeholder="请选择省"  style="width:350px;" tabindex="2" id="area-province-chosen" name="branche_province">
                                        <option value=""></option>
                                    </select> 
                                </div>
                                <div class="col-lg-5">
                                    <select class="city-chosen-select" data-placeholder="请选择市" multiple style="width:350px;" tabindex="4" id="area-city-chosen">
                                        <option value=""></option>
                                    </select> 
                                </div>
                                <input type="hidden" value="" name="branche_city" id="cityData">
                            </div>
                        </div>
                        <div class="form-group <?php if (form_error('branche_address')) echo 'has-error'; ?>">
                            <label>详细地址：</label> 
                            <input type="text" placeholder="请输入门店地址" class="form-control" value="" name="branche_address" required>
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-sm btn-primary" id="save-btn">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--END branches-->